
#ifndef __TOUCH_ADC_H__
#define __TOUCH_ADC_H__

#include "type.h"
#include "lcdadc.h"
#include "tp_interface.h"
#include "adc_drv.h"




/***** Function *****/
extern void Touch_ADC_Init_1_ch(LCDADC_InitTypeDef *adc, uint8_t channel_1);
extern void Touch_ADC_Init_2_ch(LCDADC_InitTypeDef *adc, uint8_t channel_1, uint8_t channel_2);

extern uint16_t Touch_X_Get_value(void);
extern uint16_t Touch_Y_Get_value(void);
extern uint16_t Touch_R_Get_value(void);
extern TP_Status Touch_ADC_Init(void);
extern void Touch_ADC_Calibrate(void);
extern void Touch_ADC_Pre_Calibrate(void);
extern void Touch_ADC_LCD_Calibrate_Determine(void);
extern void Touch_ADC_Pre_LCD_Calibrate_Init(void);
extern uint8_t Touch_ADC_Scan(uint8_t tp);

extern uint8_t TP_Get_Calidata(void);
extern void TP_Save_Calidata(void);

extern void Touch_Lcd_clear(int buf_addr, unsigned int width, unsigned int height, unsigned int x, unsigned int y, unsigned int size, unsigned short Color);
extern void Touch_Draw_Point(int buf_addr, unsigned int width, unsigned int height, unsigned int x, unsigned int y, unsigned int size, unsigned short Color);
extern uint8_t TS_Scan(uint8_t tp);
#endif
